package com.zcckj.demo.pay.controller;

import com.zcckj.demo.pay.model.dto.ReduceBalanceDTO;
import com.zcckj.demo.pay.service.PayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *
 * <p>
 *  TODO 类作用描述
 * </p>
 *
 * @author zhangjie
 * @since 2019-08-27
 */
@RestController
@RequestMapping("/pay")
public class PayController {
    @Autowired
    private PayService payService;
    @PostMapping("/reduce")
    public Boolean reduceBalance(@RequestBody @Validated ReduceBalanceDTO reduceBalanceDTO){
        return payService.reduceBalance(reduceBalanceDTO);
    }
}
